home *** CD-ROM | disk | FTP | other *** search
/ Atari Mega Archive 1 / Atari Mega Archive - Volume 1.iso / mint / lib / mntlib44.zoo / mntlib / fsetpos.c < prev    next >
C/C++ Source or Header  |  1994-03-01  |  283b  |  23 lines

  1. /* from Dale Schumacher's dLibs */
  2.  
  3. #include <stdio.h>
  4.  
  5. int
  6. fsetpos(fp, pos)
  7.   FILE *fp;
  8.   fpos_t *pos;
  9. {
  10.   register long rv;
  11.  
  12.   if (pos)
  13.   {
  14.     rv = fseek(fp, *pos, SEEK_SET);
  15.     if (rv >= 0)
  16.     {
  17.       fp->_flag &= ~(_IOEOF|_IOERR);
  18.       return (0);
  19.     }
  20.   }
  21.   return (-1);
  22. }
  23.